package com.example.demo.controller;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import com.example.demo.entity.Account;
import com.example.demo.service.IAccountService;
//
//import io.seata.core.context.RootContext;
//import io.seata.spring.annotation.GlobalTransactional;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author renshuai
 * @since 2020-04-02
 */
@RestController
public class AccountController {
	private static Logger log = LoggerFactory.getLogger(AccountController.class);
	
	@Autowired
	private IAccountService accountService;
	
	@RequestMapping("/update")
	public void update() {
//		log.info("Asset Service Begin ... xid: " + RootContext.getXID() + "\n");
		Account acc = new Account();
		acc.setId(1);
		acc.setMoney(100);
		accountService.updateAccount(acc);
	}

}

